import {
  createApp
} from 'vue'
import App from './App.vue'
import router from './router'
import axios from './request/axios.js' //自定义配置完了的axios
// import 'element-plus/dist/index.css'//导入全部element样式，会覆盖自定义的主题
import 'element-plus/es/components/message/style/css'; //解决elment弹出框类api问题
import * as ElementPlusIconsVue from '@element-plus/icons-vue' //el图标

import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' //element国际化语言

import vue3PhotoPreview from 'vue3-photo-preview'; //图片预览组件
import 'vue3-photo-preview/dist/index.css';
import './assets/icon/iconfont.css'; //引入自定义阿里图标
// vant在pc端没有mouse事件
import '@vant/touch-emulator';



const app = createApp(App);
app.use(router).mount('#app');
app.use(vue3PhotoPreview);
app.use(ElementPlus, {
  locale: zhCn,
})
// app.use(VueAxios,axios)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

//vue全局使用
app.config.globalProperties.$axios = axios
app.config.globalProperties.$router = router
import VueCookies from 'vue-cookies'
app.config.globalProperties.$cookies = VueCookies